package org.example.demo17_responsibility;

public class Client {
    public static void main(String[] args) {
        PurchaseOrder order = new PurchaseOrder("mao", "iPhone 12", 1000000);

        Meeting meeting = new Meeting();
        GeneralManger generalManger = new GeneralManger();
        ViceManger viceManger = new ViceManger();
        DepartmentManger departmentManger = new DepartmentManger();
        Chairman chairman = new Chairman();

        chairman.setNextHandler(departmentManger);
        departmentManger.setNextHandler(viceManger);
        viceManger.setNextHandler(generalManger);
        generalManger.setNextHandler(meeting);

        chairman.submit(order);
    }
}
